package com.group.commons.entity.patient;

import com.baomidou.mybatisplus.annotation.TableField;
import org.apache.ibatis.annotations.MapKey;

import java.util.Date;
import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * (Patient)实体类
 *
 * @author makejava
 * @since 2022-06-07 11:12:28
 */
public class Patient implements Serializable {
    private static final long serialVersionUID = 801201810234129323L;
    /**
     * 患者id
     */
    private Integer id;
    /**
     * 患者账户状态，0代表启用，1代表停用
     */
    private Integer status;
    /**
     * 注册时间
     */
    private Date registetime;
    /**
     * 患者账户名
     */
    private String account;
    /**
     * 家庭信息
     */
    @TableField(exist = false)
    private List<Family> families;
    /**
     * 收货信息
     */
    private List<Receiver> receivers;

    public Patient(String account, List<Family> families) {
        this.account = account;
        this.families = families;
    }

    public Patient() {
    }

    public Patient(Integer id, Integer status, Date registetime, String account, List<Family> families, List<Receiver> receivers) {
        this.id = id;
        this.status = status;
        this.registetime = registetime;
        this.account = account;
        this.families = families;
        this.receivers = receivers;
    }

    public List<Family> getFamilies() {
        return families;
    }

    public void setFamilies(List<Family> families) {
        this.families = families;
    }

    public List<Receiver> getReceivers() {
        return receivers;
    }

    public void setReceivers(List<Receiver> receivers) {
        this.receivers = receivers;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Date getRegistetime() {
        return registetime;
    }

    public void setRegistetime(Date registetime) {
        this.registetime = registetime;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    @Override
    public String toString() {
        return "Patient{" +
                "id=" + id +
                ", status=" + status +
                ", registetime=" + registetime +
                ", account='" + account + '\'' +
                ", families=" + families +
                ", receivers=" + receivers +
                '}';
    }
}

